<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>学生奖学金信息申请审核</title>
<%@ include file="/module/js.jsp"%>

</head>
<body>
	<form action="#" name="scholarshipForm" id="scholarshipForm" method="post">
	  <input type="hidden" id="idList" name="idList" value=""/>
		<table cellpadding="1" cellspacing="1" border="0">
			<tr>
				<td><input type="button" id="btnQuery" autocomplete="off"  value="查询"
					class="inputButton" /></td>
			</tr>
		</table>
		<table cellpadding="1" cellspacing="1">
			<tr>
				<td>学年：</td>
				<td>
				<select id="xnd" name="xnd" class="selectList2">
				 <option value="">全部</option>
				 <c:forEach items="${yearList}" var="y">
				 <option value="${y.xnd}">${y.xnd}</option>
				 </c:forEach>
				</select>
			</td>
			<td>学号：</td>
			<td><input type="text"  id="xh" name="xh" value="" autocomplete="off" class="inputText2"/></td>
			<td>姓名：</td>
			<td><input type="text"  id="xm" name="xm" value="" autocmplete="off" class="inputText2"/></td>
			</tr>
			<%@ include file="/module/gradeSpecityByClass.jsp"%>
			<%@ include file="/module/workFlow_state.jsp"%>
		</table>
		<br/>
     <table id="dg"  
		data-options="pagination:true,collapsible:true,method:'post',remoteSort:true,striped:true">
		<thead>
			<tr>
				<th data-options="field:'sqid',checkbox:true,width:100,align:'center'"></th>
				<th data-options="field:'xm',sortable:true,nowrap:true,width:200,align:'center',formatter:formaterLink">姓名</th>
				<th data-options="field:'xh',sortable:true,nowrap:true,width:200,align:'center'">学号</th>
				<th data-options="field:'bjmc',sortable:true,nowrap:true,width:200,align:'center'">班级</th>
				<th data-options="field:'xnd',sortable:true,nowrap:true,width:200,align:'center'">学年</th>
				<th data-options="field:'jxjdj',sortable:true,nowrap:true,width:200,align:'center'">奖学金等级</th>
				<th data-options="field:'submitorName',sortable:true,nowrap:true,width:200,align:'center'">填报人</th>
				<th data-options="field:'reSubmitTime',sortable:true,nowrap:true,width:200,align:'center',formatter:formatDate">填报时间</th>
				<th data-options="field:'flowState',sortable:true,nowrap:true,width:200,align:'center'">填报状态</th>
				<th data-options="field:'stepName',sortable:true,nowrap:true,width:200,align:'center'">审批步骤</th>
				<th data-options="field:'stepState',nowrap:true,width:300,align:'center'">步骤状态</th>
				<th data-options="field:'userState',nowrap:true,width:300,align:'center'">审批结果</th>
			</tr>
		</thead>
	</table>
		<script type="text/javascript">
		$(document).ready(
				function() {
 					var xnd=$('#xnd').val()==""?"${xnd}":$('#xnd').val();	
// 					var ddlStepState=$('#ddlStepState').val()=="" ?"2":$('#ddlStepState').val();
// 					var ddlUserState=$('#ddlUserState').val()=="" ? "0" :$('#ddlUserState').val();
					$('#dg').datagrid({
				     url:'${basePath}/scholarship/scholarshipStudentAuditList?xnd='+xnd,
					 /*onSortColumn :function(sort,order){
					   var _sort=sort;
					   var _order=order;
					   var options=$('#dg').datagrid('getPager').data("pagination").options;
					   var page=options.pageNumber;
					   var pageSize=options.pageSize;
					   $('#dg').datagrid('load',{
						   xnd:$('#xnd').val()==""?"${xnd}":$('#xnd').val(),njid:$("#njid").val(),zyid:$("#zyid").val(),bjid:$("#bjid").val(),xm:$("#xm").val(),xh:$("#xh").val(),ddlStates :$('#ddlStates').val(),ddlStepState:$('#ddlStepState').val(),ddlUserState:$('#ddlUserState').val(),orderFlag:_order,orderField:_sort
						});
					   },*/
					   rowStyler: function(index,row){
					   },
					   onLoadSuccess: function(data){
			                 if (data.msg!=null) {
			                	  layer.alert("只能选择一项", {icon: 5});
			                 }
		                },
					});
					
					//查询
					$('#btnQuery').click(function() {
					  $('#dg').datagrid('load',{
						 njid:$("#njid").val(),zyid:$("#zyid").val(),bjid:$("#bjid").val(),xm:$("#xm").val(),xh:$("#xh").val(),ddlStates :$('#ddlStates').val(),ddlStepState:$('#ddlStepState').val(),ddlUserState:$('#ddlUserState').val()
						});
					});
				});

		function formaterLink(value, row, index) {
		    return "<a href='${basePath}/scholarship/auditStudentScholarshipForward?sqid=" + row.bizId+"&appId="+row.appId+"&reId="+row.reId+"'>" + value + "</a>";
		}
			 if("${msg}"!=""){
			       layer.alert("${msg}", {icon: 6});
			  } 
			 compareListValue(document.getElementById('xnd'),'${xnd}');
			 
		</script>
	</form>
</body>
</html>
